extends Sprite

onready var world := get_parent()
onready var sel := world.get_node("Selection")

func _on_Cursor_order(pos: Vector2):
	if sel.can_order:
		position = pos
		visible = true
		sel.unit.set_move_target(position)

func _on_AI_order_done():
	visible = false
